/**
 * Created by zxc on 2017/7/5.
 */
function A(){
    document.getElementById('box').value=
        document.getElementById('SS').options[document.getElementById('SS').selectedIndex].value;
};

$(document).ready(function() {

    //Default Action
    $(".tab_content").hide(); //Hide all content
    $("ul.tabs li:first").addClass("active").show(); //Activate first tab
    $(".tab_content:first").show(); //Show first tab content

    //On Click Event
    $("ul.tabs li").click(function() {
        $("ul.tabs li").removeClass("active"); //Remove any "active" class
        $(this).addClass("active"); //Add "active" class to selected tab
        $(".tab_content").hide(); //Hide all tab content
        var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
        $(activeTab).fadeIn(); //Fade in the active content
        return false;
    });

});

i = 2;
$(function(){

    $(".fate").toggle(

        function(){ apd(i++,"fn1") },
        function(){ apd(i++,"fn2") },
        function(){ apd(i++,"fn3")}
    );



    function apd(i,fn){
        $("#remarks").append($('<div class="dd1">'+'<p class="first-day">第<span>'+i+'</span>天行程信息</p>'+'</div>'));
        $("#remarks").append($('<div class="dd2">'+'<span class="aboard_1">上车地点：</span>'+'' + '&nbsp;' + '<input type="text"class="changzhou" name=""placeholder="常州">' + '&nbsp;'
            +''+'</div>'));
        $("#remarks").append($('<div class="dd3">'+'<span class="destination_1">目的地：&nbsp;</span>'+'<input class="mudidi" name="" placeholder="请输入到达城市">'+'</div>'));


    }

    $("#del").click(function(){
        i--;
        $('.dd1:last,.dd2:last,.dd3:last').remove()
    })
});
